package cn.itcast.mq.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * <h4>day01_1_springcloud_eureka</h4>
 * <p>广播模式</p>
 *
 * @author : by wujianming
 * @date : 2021-11-24 19:53
 **/
@Component
public class FanoutExechange {

    //监听队列fanout.queue1中数据
    @RabbitListener(queues = "fanout.queue1")
    public void fanoutListener(String massger){
        System.out.println("massger1 = " + massger);
    }
    @RabbitListener(queues = "fanout.queue2")
    public void fanoutListener1(String massger){
        System.out.println("massger2 = " + massger);
    }

}
